// Library exception

#pragma once

// ----------------------------------------------------------------------------

namespace DSymLoad
{

// ----------------------------------------------------------------------------

struct CError
{
public:
    explicit CError(__in const CStringA &csDescription, __in DWORD nErrorCode = ERROR_SUCCESS);

    CStringA m_csDescription;
    DWORD m_nErrorCode;
};

// ----------------------------------------------------------------------------

CError MakeFunctionCallError(
    __in PCSTR szFuctionName,
    __in PCSTR szArguments = "...",
    __in DWORD nErrorCode = ::GetLastError()
);

// ----------------------------------------------------------------------------

}   // namespace DSymLoad

// ----------------------------------------------------------------------------
